import React, { FC, useState, useEffect } from 'react';
import logo from '../../logo.svg';
import './css/index.css';

import { ListView } from 'antd-mobile';

const App: FC<any> = () => {
  const [loading, setLoading] = useState(true);
  const [pageNum, setPageNum] = useState(1);
  const DS = new ListView.DataSource({
    rowHasChanged: (row1: any, row2: any) => row1 !== row2
  });
  const [dataSource, setDataSource] = useState(DS);
  useEffect(() => {
    
  }, [])
  return (
    <div className="App">
      <ListView
        dataSource={dataSource}
        renderRow={(item) => <div>{item.name}</div>}
      />
    </div>
  );
};

const getList = () => {
  setTimeout(() => {
    return [
      { name: '12321313' },
      { name: 'sdfsaf' },
      { name: '678678678' },
      { name: 'dfgfdsgsg' },
      { name: 'sdafsafsafhthuytyiu' }
    ];
  }, 1000);
};

export default App;
